import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/Login'
import Index from '@/components/Index'
import Users from '@/components/Users'
import Dept from '@/components/Dept'
import Roles from '@/components/Roles'
import Permission from '@/components/Permission'
Vue.use(Router)

export default new Router({
  routes: [{
      path: '/',
      name: 'Login',
      component: Login
    },
    {
      path: '/index',
      name: 'Index',
      component: Index,
      children: [
        {
          path: '/Users',
          name: 'Users',
          component: Users
        },{
          path: '/Dept',
          name: 'Dept',
          component: Dept
        },{
          path: '/Roles',
          name: 'Roles',
          component: Roles
        },{
          path: '/Permission',
          name: 'Permission',
          component: Permission
        },
      ]
    }
  ]
})
